/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package spring;

import java.awt.Graphics;
import java.awt.Rectangle;
import phys.State;
import vec.Vector3f;

/**
 *
 * @author Vic
 */
public abstract class Element  {
    State state;
    public   State getState()
    {
        return state;
    }

    public  void setState(State s)
    {
        this.state= s;
    }

    public abstract Vector3f getAcceleration(State state, float t);

    public abstract Vector3f getAppliedForce(Element acc, float t);

    public abstract boolean collides(Vector3f point);

    public abstract void draw(Graphics g, Vector3f origen);

    public abstract Rectangle getBounds();

    public abstract Vector3f getMaxInDir(Vector3f dir);

    public abstract boolean isPassive();

    public void setMass(float mass) {
        state.setMass(mass);
    }

    public Vector3f getPosition() {
        return state.getPosition();
    }

    public Vector3f getImpulse() {
        return state.getImpulse();
    }

    public Vector3f getMomentum() {
        return state.getMomentum();
    }

    public Vector3f getAngularMomentum() {
        return state.getAngularMomentum();
    }

    public Vector3f getVelocity() {
        return state.getVelocity();
    }

    public Vector3f getAngularVelocity() {
        return state.getAngularVelocity();
    }

    public float getMass() {
        return state.getMass();
    }

    public float getInverseMass() {
        return state.getInverseMass();
    }

    public float getInitertia() {
        return state.getInitertia();
    }

    public float getInverseInertia() {
        return state.getInverseInertia();
    }

    public void setPosition(Vector3f position) {
        state.setPosition(position);
    }

    public void setImpulse(Vector3f impulse) {
        state.setImpulse(impulse);
    }

    public void setAngularMomentum(Vector3f angularMomentum) {
        state.setAngularMomentum(angularMomentum);
    }

    public void setVelocity(Vector3f velocity) {
        state.setVelocity(velocity);
    }

    public void setInverseMass(float inverseMass) {
        state.setInverseMass(inverseMass);
    }

    public void setInitertia(float initertia) {
        state.setInitertia(initertia);
    }
    
}
